Rendering the MDriven Turnkey application yourself

MDriven Turnkey is both the complete rule engine that executes your model AND the rendering engine to create the UI based on your declarative ViewModels from your model. To stand out, you may want to own your UI rendering. This article describes how to get runtime access to enough meta information from the model to create your own engine for UI.

Main Menu

To integrate a Turnkey application into an existing site, control how the main menu is merged with other actions on your site.

See: https://licenseandticket.azurewebsites.net/MDriven/GlobalActionsMeta

If you use the MVC action MDriven/GlobalActionsMeta, you get all the needed meta information.

Rendering MT -1 .png

This is good information if you do not want hard code to have access to certain views in your application but would rather create generic logic that will discover all existing and new views you have in the model. Implementing your own motor to do this is the way to go to fully utilize the generic nature of MDriven model-driven applications.

Views

Create your own motor to render the UI of a view. To get access to the needed meta information, do this:https://licenseandticket.azurewebsites.net/MDriven/ViewMeta?view=RuntimeKey where RuntimeKey is the name of the View – that you can find the GlobalActionsMeta.

The results from ViewMeta look like this:

Rendering MT - 2.png

This is the strategy used by the WPF turnkey client discussed here: WPFMahappAndGantt.

You will find all the code for this on the download page under the name “MDriven Turnkey Client Code”.

Note that the TaggedValues you set on ViewModelColumns will show up in the meta information. This way, you can keep your own instructions in the model in MDriven Designer.

This page was edited 153 days ago on 06/17/2024. What links here